<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <?php echo $this->Html->charset(); ?>
        <title>
            <?php __('Loyalty Virgin'); ?>
            <?php echo $title_for_layout; ?>
        </title>
        <?php
            echo $this->Html->meta('icon');
            echo $this->Html->css('style-new');
            echo $this->Html->css('jquery/jquery.ui.all');
            echo $this->Html->css('screen');
            echo $this->Html->css('styles');
            //echo $this->Html->css('flash');
        ?>

        <!--[if IE]>
        <?php      
            echo $this->Html->css('ie');
        ?>
            <style>
              #top_menu {
                padding: 7px 6px !important;
                border: 2px solid #404041
              }
            </style>
        <![Endif]-->  
<style>
@-moz-document url-prefix() {
#top_menu {
  padding: 7px 6px !important;
}                    }
</style>  
        <?php
            echo $this->Html->script('jquery-1.7.2');  
        ?>
        <?php   
            echo $this->Html->script('jquery-ui/external/jquery.bgiframe-2.1.2');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.core');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.widget');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.datepicker');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.mouse');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.button');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.draggable');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.position');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.resizable');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.dialog');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.tabs');
            echo $this->Html->script('jquery-ui/ui/jquery.ui.autocomplete');
            echo $this->Html->script('jquery-ui/ui/jquery.effects.core');
            echo $this->Html->script('jquery.dataTables');
            echo $this->Html->script('chosen.jquery');
            echo $this->Html->css('chosen');
            echo $this->Html->script('jquery.maskedinput-1.3');
            echo $this->Html->css('admin/calendrical');
            echo $this->Html->script('admin/jquery.calendrical');
            echo $this->Html->script('admin/jquery.filestyle'); 
            echo $this->Html->script('admin/jquery.tooltip'); 
        ?>

        <?php    
            echo $this->Html->script('admin/jquery.selectbox-0.5_style_2'); 
        ?>
        <script type="text/javascript">
        jQuery(document).ready(function() {
                jQuery(".chosen").chosen();
                jQuery('.info-tooltip ').tooltip({
                        track: true,
                        delay: 0,
                        fixPNG: true, 
                        showURL: false,
                        showBody: " - ",
                        top: -35,
                        left: 5
                });
                
                
                $('form.form').submit(function(){
                    $("form.form input[type=submit]").addClass("hidden");
                    $("form.form input[type=submit]").before('<input class="submit-button" id="temp-submit" type="button" value="Saving ..."></input>');
                    //$('form.form').submit();
                    return true;
                });
        }); 
        function check_in_array(value,array){
            var ret = 0;
            for(i=0;i<=array.length;i++){
                if(array[i]==value){
                    ret = 1;
                    break;
                }
            }
            return ret;
        }
        function get_city(type,country_id,city_id){
            $('#city-update a.chzn-single span').html('loading .... ');
            $.get('<?php echo $this->Html->url(array('controller'=>'customers','action'=>'get_city_list','admin'=>false)) ?>/'+type+'/'+country_id+'/'+city_id, function(data){
                $('#city-update').html(data);
                $('.chosen').chosen();
            });
        }
        </script>
        <?php    
            echo $this->Html->script('admin/jquery.pngFix.pack'); 
        ?>
        <script type="text/javascript">
        jQuery(document).ready(function(){
            jQuery(document).pngFix( );
        }); 
   
   /*  jQuery.fn.flashMsg = function() {
        //jQuery(this).livequery(function() {
            $this = jQuery(this);
            $this.fadeOut(30000, function() {
               $this.remove();
           });             
        //});
    };

      jQuery(document).ready(function() {        
        jQuery('#errorMessage,#authMessage,#successMessage,#flashMessage').flashMsg();
      });*/     
        </script>
    </head>
    <body id="frontend">
      <table align="center" width="960">
        <tr>
          <td>
            <div id="all_content">
              <div class="main_wrapper">
              <div class="header_image"></div>
                <div id="header">
                  <div class="header_left">
                    <div class="header_logo">
                      <!--[if IE]>
                        <?php echo $this->Html->image('../images/ie/header_logo2.jpg'); ?>
                      <![Endif]-->
                      <!--[if !IE]><!-->
                        <?php echo $this->Html->image('../images/header_logo2.jpg'); ?>
                      <!--<![endif]-->
                    </div>
                    <div class="header_text"><span class="big_font">Limitless</span> <br />There's always room for more</div>
                  </div>
                  <div class="header_right">
                    <!--<div class="menu_top"></div>-->
                    <?php if(isset($current_customer)){?>
                    <div id="top_profile">
                        <span style="font-size: 10px">Your Balance</span><br/>
                        <span style="font-size: 26px"><?php echo $current_customer['Customer']['balance'] ?></span>
                    </div>
                    <div id="top_profile" style="margin-right: 10px ">
                        <span style="font-size: 10px">Your point</span><br/>
                        <span style="font-size: 26px"><?php echo $current_customer['Customer']['point'] ?></span>
                    </div>
                    <?php }else{ ?>
                    <div id="top_profile" style="background: #000">
                            <span style="font-size: 10px"></span><br/>
                            <span style="font-size: 26px"></span>
                        </div>
                    <?php } ?>
                    <div id="top_menu">
                      <?php echo $this->element('top_font_nav') ?>
                    </div>
                  </div>
                </div>
                <div class="middle_image">
                  <!--[if IE]>
                    <?php echo $this->Html->image('../images/ie/middle2.jpg'); ?>
                  <![Endif]-->
                  <!--[if !IE]><!-->
                    <?php echo $this->Html->image('../images/middle2.jpg'); ?>
                  <!--<![endif]-->
                </div>

        <div id="content-container">
            <?php //echo $this->Session->flash(); ?>
            <?php echo $content_for_layout; ?>
        </div>

              <div class="footer_content">
                <div class="footer_left">
                  <div class="social_icon">
                    <div class="twitter">
                      <div class="twitter_image">
                        <?php echo $this->Html->link($this->Html->image('../images/twitter_icon.png'), array(), array('escape' => false)); ?>
                        <span class="twitter_text">
                          <?php echo $this->Html->link('Twitter/Virgin_KSA', array()); ?>
                        </span>
                      </div>
                    </div>
                    <div class="facebook">
                      <div class="facebook_image">
                        <?php echo $this->Html->link($this->Html->image('../images/facebookIcon.png'), array(), array('escape' => false)); ?>
                        <span class="facebook_text">
                          <?php echo $this->Html->link('Facebook/Virgin_KSA', array()); ?>
                        </span>
                      </div>
                    </div>
                  </div>
                </div>
                <div class="footer_right">
                  <span class="copy_right">Copy Right 2013 VIRGIN MEGASTORE</span><br/> All rights reserved 
                </div>
              </div>
              <div class="footer_image"></div>
            </div>
          </div>
                <?php echo $this->element('sql_dump'); ?>
        </td>
      </tr>
    </table>
  </body>
</html>
